<template>
  <!--显示专辑内容列表组件-->
  <div class="songInfo">
    <ul class="song">
      <li>
        <ul class="showInfo">
          <li class="flex2" @click="skipGrabble('playSong',info.id)">
            {{info.name}}
            <img src="~@/assets/img/play.png" width="25px" alt="">
          </li>
          <li @click="skipGrabble('GrabbleType100',info.ar[0].id)">{{info.ar[0].name}}</li>
          <li @click="skipGrabble('albumPage',info.al.id)">{{info.al.name}}</li>
        </ul>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "albumSongs",
  props: ["info"],
  mounted() {
    console.log(this.info);
  },
  methods:{
    skipGrabble(path, val) {
      this.$router.push({
        name: path,
        query: {
          keyWord: val
        }
      });
    }
  }
};
</script>

<style scoped lang='less'>
.songInfo {
  .song {
    padding: 0;
    li {
      .showInfo {
        display: flex;
        padding: 0;
        height: 50px;
        li {
          flex: 1;
          line-height: 50px;
          word-break: keep-all;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          font-family: 'Courier New', Courier, monospace;
        }
        li.flex2 {
          flex: 2;
          img{
            vertical-align: middle;
            float:right;
            display: none;
            margin:10px 30px;
          }
        }
        li.flex2:hover>img{
          display: inline-block;
        }
        li:hover {
          color:#31c27c;
          cursor: pointer;
        }
      }
    }
  }
}
</style>